//////////////////////////////////////////////////////////////////////////////////
//
//	Picky Admin
//		- Version 1.0
//		- 11.30.2007
//		- diamond-optic
//
//////////////////////////////////////////////////////////////////////////////////
//
// Information:
//
//	Very basic godmode & noclip plugin made for a request
//
//////////////////////////////////////////////////////////////////////////////////
//
// Changelog:
//
// 	- 11.30.2007 Version 1.0
//		Initial Public Release
//
//////////////////////////////////////////////////////////////////////////////////

#include <amxmodx>
#include <amxmisc>
#include <fun>

#define PLUGIN "Picky Admin"
#define VERSION "1.0"
#define AUTHOR "diamond-optic"


public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)

	//plugin stats public cvar
	register_cvar("amx_pickyadmin_stats", "1.0", FCVAR_SERVER|FCVAR_SPONLY)
	
	register_concmd("amx_godmode", "admin_godmode", ADMIN_BAN, "Toggle god mode")
	register_concmd("amx_noclip", "admin_noclip", ADMIN_BAN, "Toggle no-clip")

}

////////////////////////////////////////////////////////////////
//	godmode
//
public admin_godmode(id,level,cid)
{
	if (!cmd_access(id, level, cid, 1) || !is_user_connected(id))
		return PLUGIN_HANDLED
		
	if(!get_user_godmode(id))
		{
		set_user_godmode(id,1)
		client_print(id,print_chat,"Godmode ON")
		}
	else
		{
		set_user_godmode(id,0)
		client_print(id,print_chat,"Godmode OFF")
		}
	
	return PLUGIN_HANDLED
}

////////////////////////////////////////////////////////////////
//	noclip
//
public admin_noclip(id,level,cid)
{
	if (!cmd_access(id, level, cid, 1) || !is_user_connected(id))
		return PLUGIN_HANDLED
		
	if(!get_user_noclip(id))
		{
		set_user_noclip(id,1)
		client_print(id,print_chat,"No-Clip ON")
		}
	else
		{
		set_user_noclip(id,0)
		client_print(id,print_chat,"No-Clip OFF")
		}
	
	return PLUGIN_HANDLED
}